FROM node:18.19.1 as builder
RUN git clone https://gitee.com/youqianglinux/k8s-code-platform-vue-admin.git && cd k8s-code-platform-vue-admin && npm install && npm run build:prod && ls -d dist
FROM nginx
COPY --from=builder k8s-code-platform-vue-admin/dist /usr/share/nginx/html
COPY --from=builder k8s-code-platform-vue-admin/CICD/Dockerfiles/vue-admin-nginx.conf /etc/nginx/conf.d/default.conf
CMD ["nginx", "-g", "daemon off;"]